﻿//===================================================================
// 项目名称  零陵MES
// 模块名称：物料管理
// 类    名：
//===================================================================
// 历史：
// Date        Modified_By  Reason      Description 
// 2009/11/02    刘亮        创建         废烟支管理

//===================================================================
//  Copyright (c) 2009-2010  拓维 All rights reserved.
//===================================================================

var form1 = {
    type  : "form", 
    name  : "search",   
    title : "查询条件",
    
    isSearch : true,            
    items : [
            {
		type:"calendar", title:"日期从", dataIndex:'beginDay'    
	    },{
		type:"calendar", title:"至", dataIndex:'endDay'     
           },
	    { 	
        	type		:	"combox",    
        	title		:	"收支类别",       
        	dataIndex	:	'matname', 
        	openWidth 	: 	600,
        	openHeight	:	600,	
        	openUrl		: 	""
            },
	    { 	
        	type	        :	"combox",    
        	title		:	"收支项目",       
        	dataIndex	:	'matname1', 
        	openWidth 	: 	600,
        	openHeight	:	600,	
        	openUrl		: 	""
            },
            {
                type:"input",
                title:"备注"
            }
    ],

    "layoutConfig" : {
                    columns : 6
                },
    layout : [{
            items:[
                {'name':'日期从'},
                {'name':'至'},
                {'name':'收支类别'},
                {'name':'收支项目'}, 
                {'name':'备注', colspan:2} 
            ]
        }
    ]
};

//=======================================================================================
//定义一个静态列表表单对象 grid1
//=======================================================================================
var grid1 = {
    "name"      : "普通列表1",
    "type"      : "grid",
    "title"     : "日常收支管理",
    colCheckbox : true,
    pageSize:4,
    "url"       : "data/feiYianzhiList1.txt",

    "tbar"      : [
        {text: '新增'}, '-',
        {text: '删除'}
    ],
    "bindRelation"   : {
        "root"  :"dataset.grid",
         id    : "pid",
        "col"   :[  
            {"header":"日期",             "width":100, "align":"left",  "dataIndex":"data" },    
            
            {"header":"收支类别",  "width":100, "align":"left",  "dataIndex":"matname"},
            {"header":"收支项",  "width":100, "align":"left",  "dataIndex":"lyweight"},     
            {"header":"金额",      "width":100, "align":"left",  "dataIndex":"ssweight"},                   
            {"header":"经受人",        "width":100, "align":"left",  "dataIndex":"fmweight"},
            {"header":"备注",             "width":100, "align":"left",  "dataIndex":"creator"},
            {"header":"修改",         		"actionCol" :true }
        ]
        
    }
};


var page1 = new Sail.page({
    id : "page_001",
    haveNavi:true,
        localNaviText : "您的位置：财务>日常收支管理",
    frames : {
        name   : "RollStandardList",
        title  : "标题",
        autoLoad : false,
        items  : [form1,grid1],
      
        afterCreateWidgets : function(){
           
        },
        
        bindEvent2Items : function(){
           var sendData = {};
           var isFlag ;
           var grid1 = this.getItem('普通列表1'); 
           var obj_form = $("search");
           grid1.getButton('新增').on('click',function(){
                Sail.open("feiYianzhiUpdate.html","add",{},550,300);
               });          
						
		 
        
       }
       
    },
    afterRun : function(){
        
    }
});

page1.run();

    